package com.crjjason.utility.redpacket;

public class RedPacketDistributionConfig {
	private int minimum;
	private int maximum;
	private int numberOfRedPacket;
	
	public int getMinimum() {
		return minimum;
	}
	public int getMaximum() {
		return maximum;
	}
	
	public RedPacketDistributionConfig(int minimum, int maximum){
		if(minimum < 1){
			throw new IllegalArgumentException("Minimum could not be less than 1");
		}
		if(maximum <= minimum){
			throw new IllegalArgumentException("Maximum could not be less than or equal to minimum");
		}
		
		this.minimum = minimum;
		this.maximum = maximum;
	}
	
	public static RedPacketDistributionConfig getDefaultRedPacketDistributionConfig(){
		RedPacketDistributionConfig defaultConfig = new RedPacketDistributionConfig(1, 20000);
		return defaultConfig;
	}
	
}
